<?php
/**
 * Bdat Site development
 * @author Will Skates
 */

/*----------------------------------------------------------------------------------------------------*/

/**
 * Class for getting information from the database upon an ajax request.
 * (User information is handled serperately because the functionality needs to be flexible enough to work with various forms).
 * 
 * @author Will Skates
 *
 */
class ajaxmodel extends CI_Model {
	
	/**
	 * Constructor (Not used here, but overrides code ignighters default model functionality in order to improve performance).
	 */
	public function __construct(){}
	
	/*----------------------------------------------------------------------------------------------------*/
	
	/**
	 * Get the full content of a masonry block from the database.
	 * @param StdClass 	$info - all of the information which identifies a specific block.
	 */
	public function getBlockFull( $info )
	{
		
		$query = $this->db->query('SELECT content FROM ' . $info->table . '
				  WHERE title = \'' . $info->title .'\' AND uid = ' . $info->uid);

		return $query->result();
		
	}
	
	/*----------------------------------------------------------------------------------------------------*/
	
}